<!DOCTYPE html>
<html lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>管理系统</title>
    <link href="../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="../build/css/custom.min.css" rel="stylesheet">
    <link rel="stylesheet"   href="css/pubuse.css">
  
  </head>

  <body class="nav-md">
    <div class="container body">
      <div class="main_container">
        <div class="col-md-3 left_col">
          <div class="left_col scroll-view">
            <div class="navbar nav_title" style="border: 0;">
              <a href="index.html" class="site_title"><i class="fa fa-paw"></i> <span>出票管理系统</span></a>
            </div>

            <div class="clearfix"></div>

            <!-- menu profile quick info -->
            <div class="profile clearfix">
              <div class="profile_pic">
                <img src="img/b4.png" alt="..." class="img-circle profile_img">
              </div>
              <div class="profile_info">
                <span>Welcome</span>

              </div>
            </div>
            <!-- /menu profile quick info -->

            <br />

            <!-- sidebar menu -->
            <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
              <div class="menu_section">


                <!-- #include virtual="/webadmin/store/share/publeftbar.html" -->
            
                <!--  -->
                 
              </div>
            

            </div>
           

          </div>
        </div>

        <!-- top navigation -->
        <div class="top_nav">
          <div class="nav_menu">
            <nav>
              <ul class="nav navbar-nav navbar-right">
                <li class="">
                  <button type="button" class="" id="logoutbtn"   onclick="loginOut()">
                    退出 
                   </button>
               
                </li>

              </ul>
            </nav>
          </div>
        </div>
        <!-- /top navigation -->

        <!-- page content -->
        <div class="right_col  right_col_sel" role="main">
          <div class="">
           

            <div class="clearfix"></div>

            <div class="row">
              <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                  <div class="x_title"  style="position:relative;">
                    <h2>密码修改</h2>
                
                     
               

                 
                    <div class="clearfix"></div>
                  </div>
                  <div class="table-responsive">
                
                 
                        <section class="login_content  modifypwdbox"  style="">
                          <form>
                            <h1>密码修改</h1>
                            <div  class="modifyinfo">
                             <label for="">新密码</label>
                              <input type="text" class="form-control" placeholder="请输入新密码" required="" id="newpwd" style="padding:8px  12px;">
                            </div>
                            <div   class="modifyinfo">
                              <label for="">旧密码</label>
                              <input type="password" class="form-control" placeholder="请输入旧密码" required="" id="oldpwd" style="padding:8px  12px;">
                            </div>
                         
                            <div>
                              <a class="btn btn-default submit" style="padding:8px  40px;" id="modifypwdBtn">修改</a>
                             
                            </div>
              
                            <div class="clearfix"></div>
              
                           
                          </form>
                        </section>

                  </div>
                </div>
              </div>

            </div>
          </div>
        </div>
      </div>
    </div>


 
     <!-- 公用 弹窗 -->
     <div class="modal " id="loginoutModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"  style="z-index:3000;">
        <div class="modal-dialog" role="document">
          <div class="modal-content">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
              <h4 class="modal-title" id="myModalLabel"   style="text-align:center;"></h4>
            </div>
            <!-- <div class="modal-body">
              <div  id="tipsContent"></div>
            </div> -->
            <div class="modal-footer">
              <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
            </div>
          </div>
        </div>
      </div>


    <script src="../vendors/jquery/dist/jquery.min.js"></script>
    <script  src="js/publicuse.js"></script>
    <script src="../vendors/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="../build/js/custom.min.js"></script>

    <script>
      (function(){
        function  modifyPwd(){
           var newPwd = $("#newpwd").val();
           var oldPwd = $("#oldpwd").val();
           if(!newPwd)
           {
              $("#newpwd").focus();
              return false;
           }
           if(!oldPwd)
           {
              $("#oldpwd").focus();
              return false;
           }
           $.ajax({
              type:"get",
              url:"/admin/set_passwd?password="+newPwd+"&oldpassword="+oldPwd,
              dataType:"json",
              success:function( info ){
                   var code = info.code;
                   var desc = info.desc;
                   if( code == 1 )
                   {
                     alert("修改成功!");
                   }
                   else
                   {
                       alert(desc);
                   }
                   
                 

              }
           });
        }
        $("#modifypwdBtn").click(function(){
            modifyPwd();
        });

      }());
    </script>

  </body>
</html>